package com.demo.service.impl;

import com.demo.entity.Role;
import com.demo.mapper.RoleMapper;
import com.demo.service.RoleService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class RoleServiceImpl implements RoleService {
    @Autowired
    private RoleMapper mapper;

    @Override
    public PageInfo<Role> list(int pageIndex, int pageSize) {
        PageHelper.startPage(pageIndex,pageSize);
        return new PageInfo<>(mapper.list());
    }

    @Override
    public List<Role> list() {
        return mapper.list();
    }

    @Override
    public List<String> path(String roleId) {
        return mapper.path(roleId);
    }


}
